﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;

namespace Three_Red_Dragon_Mvc.Controllers
{
    public class EnterpriseController : Controller
    {
        private readonly IpAddressesConfig _ipAddressesConfig;

        public EnterpriseController(IOptions<IpAddressesConfig> ipAddressesConfig)
        {
            _ipAddressesConfig = ipAddressesConfig.Value;
        }
        /// <summary>
        /// 企业信息页面
        /// </summary>
        /// <returns></returns>
        public IActionResult EnterpriseInfo()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 添加企业信息页面
        /// </summary>
        /// <returns></returns>
        public IActionResult CreateEnterprise()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 部门信息页面
        /// </summary>
        /// <returns></returns>
        public IActionResult DepartmentInfo()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }

        /// <summary>
        /// 添加部门信息页面
        /// </summary>
        /// <returns></returns>
        public IActionResult CreateDepartment()
        {
            ViewBag.RBACWrite = _ipAddressesConfig.RBACWrite;
            ViewBag.RedDragonWrite = _ipAddressesConfig.RedDragonWrite;
            return View();
        }
    }
}
